<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>手风琴进阶版</title>
</head>
<body>
    <style>
        *{
            margin: 0;
            padding: 0;
            list-style: none;
            box-sizing: border-box;
        }
        .nav{
            width: 222px;
            border: 1px solid #cccccc;
        }
        .nav li{
            position: relative;
            margin-top: 15px;
            margin-bottom: 15px;
        }
        .nav input{
            /* visibility: hidden; */
        }
        
        .item-box p{
            height:45px;
            line-height: 45px;
            padding-left: 28px;
            color:#666666;
        }
        .nav li .item-box{
            overflow: hidden;
            max-height: 0;
			/* height: 0; */
            transition: all .3s;
        }
        .nav li input:checked~.item-box{
            max-height: 50px;
        }
    </style>
<ul class="nav">
    <li>
        <label for="box1"><span>洋魔方保障</span></label>
        <input type="checkbox" id="box1">
        <span class="open">+</span>
        <span class="close">-</span>
    </li>
    <li>
        <label for="box2"><span>新手帮助</span></label>
        <input type="checkbox" id="box2">
        <span class="open">+</span>
        <span class="close">-</span>
        <div class="item-box">
            <p><a href="#">支付宝充值</a></p>
            <p><a href="#">支付宝充值</a></p>
        </div>
    </li>
</ul>
    
    
</body>
</html>